package com.app.jzgdirector.service.util;

import android.os.Environment;

import com.common.baselibrary.log.LogUtil;

import java.io.File;

/**
 * 作者: ZHANGDSH
 * 时间: 17/5/9
 * 邮箱: ZHANGDEYUAN581@PINGAN.COM.CN
 * 描述: 读取sdcard上的文件
 */

public class StorageUtils {

    private static final String TAG = StorageUtils.class.getSimpleName();

    /**
     * 获取
     */
    public static void test() {

        String path = Environment.getExternalStorageState();
        LogUtil.e(TAG, "Environment.getExternalStorageState():" + Environment.getExternalStorageState());
        LogUtil.e(TAG, "Environment.getDataDirectory():" + Environment.getDataDirectory());
        LogUtil.e(TAG, "Environment.getDownloadCacheDirectory():" + Environment.getDownloadCacheDirectory());
        LogUtil.e(TAG, "Environment.getExternalStorageDirectory().getAbsolutePath():" + Environment.getExternalStorageDirectory().getAbsolutePath());
        LogUtil.e(TAG, "Environment.getExternalStorageDirectory().getPath():" + Environment.getExternalStorageDirectory().getPath());

        File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "jzgdirector");
        if (!file.exists()) {
            LogUtil.e(TAG, "flag:" + file.mkdirs());
        }
    }
}
